//
// Decompiled by Jadx - 439ms
//
package gc;

import android.text.TextUtils;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XC_MethodReplacement;
import de.robv.android.xposed.XposedHelpers;
import fn.j;
import fn.y;
import java.util.List;

public class ck$a extends XC_MethodReplacement {
    public static final int a = 0;

    public final Object replaceHookedMethod(XC_MethodHook.MethodHookParam methodHookParam) {
        if (!j.ae("PostAudio")) {
            return j.w(methodHookParam);
        }
        List list = (List) XposedHelpers.getObjectField(methodHookParam.args[0], "attachments");
        if (list == null || list.isEmpty()) {
            return j.w(methodHookParam);
        }
        Object obj = list.get(0);
        if (obj != null && (TextUtils.isEmpty(j.as(obj, "fileUrl")) || XposedHelpers.getIntField(obj, "fileDuration") < 1)) {
            return j.w(methodHookParam);
        }
        if (!"AUDIO".equals(((Enum) XposedHelpers.getObjectField(methodHookParam.args[0], "type")).name())) {
            return j.w(methodHookParam);
        }
        y.by.getMainHandler().post(new af(this, obj, methodHookParam, 1));
        return null;
    }
}
